$(function ()
{
    findMsg();
})

function findMsg()
{
    let data = fontAjax('/aboutus', {}, 'get');

    let model = data.model;
    let productTypeList = data.productTypeList;

    let productName = '';

    if (model != null)
    {
        $('#bigTitle').html('<a href="/html/projectServer.html">' + model.bigTitle + '</a>');
        $('#smallTitle').html(model.smallTitle);
        $('#rephone').html(model.reservationPhone);
        let modelHotel = model.hotelMsg;
        let hotelMsgs = modelHotel.split('\n');
        let hotelMsg = '';
        for (let j = 0; j < hotelMsgs.length; j++)
        {
            hotelMsg += '<div class="hotelMsg">' + hotelMsgs[j] + '</div>';
        }
        $('#hotelMsg').html(hotelMsg);
    }

    if (productTypeList != null)
    {
        for (let i = 0; i < productTypeList.length; i++)
        {
            if (i < 5)
            {
                productName += '<div><a href="/html/projectServer.html">' + productTypeList[i].productType + '</a></div>';
            }
        }
    }
    $('#productName').html(productName);
}